<?php

######################
include ("head.php");#
######################

$tmp = explode('-', $infos['birth']);
$bday = $tmp[2];
$mday = $tmp[1];
$yday = $tmp[0];

if (@$infos['fac'] == "")
	$infos['fac'] == "none";

if ($uid == $_SESSION['uid'])
{
	Print("
		<table width=100%>
			<tr>
				<td width=47% valign=top>
					<div id=\"box\" style=\"height: 200px; border: 0;\">
						<h3>Information personelles</h3>
						<hr style=\"border: 0; border-top: 1px lightgray solid;\"><br>
						<form action=profil.php method=POST>
						<input type=hidden name=\"action\" value=\"modif_infos\">
						<small style=\"color: gray;\">Pr&eacute;nom :</small><br>
						<input type=text name=\"first\" value=\"$infos[first]\">
						<br>
						<small style=\"color: gray;\">Nom :</small><br>
						<input type=text name=\"last\" value=\"$infos[last]\">
						<br><br>
						<small style=\"color: gray;\">Date de naissance :</small><br>
	");
							show_select_date_2("birth", $bday, $mday, $yday);
	Print("
						<br>

						<table border=0 width=100%><tr><td>
	");

	Print("
						</td><td width=20% align=right><input type=submit value=\"Enregistrer\"></td></tr></table>
						</form>
					</div>
				</td>
				<td width=5%></td>
				<td width=48% valign=top>
					<div id=\"box\" style=\"height: 200px; border: 0;\">
						<h3>Informations du compte</h3>
						<hr style=\"border: 0; border-top: 1px lightgray solid;\"><br>
						<form action=profil.php method=POST>
						<input type=hidden name=\"action\" value=\"modif_profil\">
						<small style=\"color: gray;\">Nom d'utilisateur :</small><br>
						<b>$_SESSION[login]</b>
						<br>
						<small style=\"color: gray;\">Adresse E-Mail :</small><br>
						<input type=text name=\"mail\" value=\"$_SESSION[mail]\">
						<br><br><br><br>");
						/*<small style=\"color: gray;\">Template :</small><br>*/
						Print("<table border=0 width=100%><tr><td width=80% valign=top>
	");
							/*show_templates_list(@$_SESSION['tid']);*/
	Print("
						</td><td width=20% align=right><br><br><br><input type=submit value=\"Enregistrer\"></td></tr></table>
						</form>
					</div>
				</td>
			</tr>
		</table>
		<br>
		<table width=100%>
			<tr>
				<td width=47% valign=top>
					<div id=\"box\" style=\"height: 200px; border: 0;\">
						<h3>Modification du mot de passe</h3>
						<hr style=\"border: 0; border-top: 1px lightgray solid;\"><br>
						<form action=profil.php method=POST>
						<input type=hidden name=\"action\" value=\"modif_pass\">
						<small style=\"color: gray;\">Mot de passe actuel :</small><br>
						<input type=password name=\"passold\">
						<br>
						<small style=\"color: gray;\">Nouveau mot de passe :</small><br>
						<input type=password name=\"pass1\">
						<br>
						<small style=\"color: gray;\">Confirmation :</small><br>
						<input type=password name=\"pass2\">
						<br>
						<table border=0 width=100%><tr><td>
						</td><td width=20% align=right><br><br><br><input type=submit value=\"Enregistrer\"></td></tr></table>
						</form>
					</div>
				</td>
				<td width=5%></td>
				<td width=48% valign=top>
				</td>
			</tr>
		</table>
		<br>

	");
}
else
{
	redirect("profil.php", 1);
	exit;
}

?>